package it.basilikos.core.service;

import it.basilikos.core.model.Agent;
import it.basilikos.core.model.Conferment;
import it.basilikos.core.model.ProductConferred;
import it.basilikos.core.model.dao.IProductConferredDAO;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class ProductConferredService {

	@Autowired
	protected IProductConferredDAO dao;
	
	@Transactional(readOnly=true)
	public void test()
	{
		for(ProductConferred pc: dao.findAll())
		{
			Conferment c  =pc.getConferment();
			System.out.println("CONF = "+c);
			 
			Agent a = c.getAgent();
				System.out.println("\t > agent = "+a);
		}
	}
	
}
